package net.lahuobao.mall.service.impl.admin;

import net.lahuobao.mall.dao.admin.MallShopCardUseMapper;
import net.lahuobao.mall.entity.admin.MallShopCardUseEntity;
import net.lahuobao.mall.entity.admin.MallShopCardUseStatic;
import net.lahuobao.mall.service.admin.MallShopCardUseServiceI;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 油卡使用管理查询服务
 * Created by zoyation
 * Date:2017/3/29
 * Time:20:16
 */
@Service("mallShopCardUseService")
@Transactional
public class MallShopCardUseServiceImpl implements MallShopCardUseServiceI{
    @Autowired
    private MallShopCardUseMapper mallShopCardUseDao;
    @Override
    public List<MallShopCardUseEntity> getPageData(Map map) {
        return mallShopCardUseDao.getPageData(map);
    }

    @Override
    public int getPageDataCount(Map map) {
        return mallShopCardUseDao.getPageDataCount(map);
    }

    @Override
    public MallShopCardUseStatic getStaticInfo(Map map) {
        return mallShopCardUseDao.getStaticInfo(map);
    }

    @Override
    public List<MallShopCardUseEntity> getPageDataDetail(Map map) {
        return mallShopCardUseDao.getPageDataDetail(map);
    }

    @Override
    public int getPageDataDetailCount(Map map) {
        return mallShopCardUseDao.getPageDataDetailCount(map);
    }

    @Override
    public List<MallShopCardUseEntity> getNoPageData(Map<String, Object> pageQueryMap) {
        return mallShopCardUseDao.getNoPageData(pageQueryMap);
    }

    /**
     * 获取油卡信息
     *
     * @param cardNo
     * @return
     */
    @Override
    public MallShopCardUseEntity getCardNoInfo(String cardNo) {
        Map map = new HashMap();
        map.put("cardNo",cardNo);
        return mallShopCardUseDao.getCardNoInfo(map);
    }

}
